package com.fita.scheduler.dao;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Update;
import com.demo2do.core.persistence.annotation.Variable;
import com.fita.scheduler.entity.AgentCompany;

/**
 * @description:
 * @author: 11200
 * @date: 2019/9/6
 */
@Dao
public interface AgentCompanyDao {

    @Query("SELECT id, total_commission  FROM agent_company where id = :agentCompanyId")
    AgentCompany load(@Variable("agentCompanyId") Long agentCompanyId);

    @Update("UPDATE agent_company SET total_commission = :totalCommission WHERE id = :id")
    void addAgentCommission(AgentCompany agentCompany);
}
